import React, { Component } from 'react'
import { Router, Route, Switch } from 'react-router-dom'

import Login from './pages/Login'
import Layout from './pages/Layout'
import NotFound from 'pages/NotFound'

import AuthRoute from 'components/AuthRoute'
import history from 'utils/history'

export default class App extends Component {
	render() {
		return (
			<Router history={history}>
				<div>
					<Switch>
						<Route path={'/login'} component={Login} />
						<AuthRoute path={'/home'} component={Layout} />
						<Route component={NotFound} />
					</Switch>
				</div>
			</Router>
		)
	}
}
